package com.xwolf.os.configuration;

import com.xwolf.os.Domain.MyBean;
import com.xwolf.os.configuration.properties.EmsProperties;
import lombok.extern.log4j.Log4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ming
 * @Description:
 * @create 2018-08-25 2:10 PM
 **/
@Configuration
@EnableConfigurationProperties(EmsProperties.class)
@Log4j
public class DynamicAutoConfiguration {

    @Bean
    MyBean myBean(EmsProperties emsProperties){
        log.info(">>>>" + emsProperties);
        return new MyBean();
    }
}
